<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>跳动的心</title>
    <style>
      * {
        padding: 0px;
        margin: 0px;
      }
      body {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
      }
      .heart {
        width: 100px;
        height: 100px;
        background-color: red;
        transform: rotate(45deg) scale(0.5);
        opacity: 0.5;
        animation-name: pulse;
        animation-duration: 1s;
        animation-iteration-count: infinite;
      }
      @keyframes pulse {
        to {
          transform: rotate(45deg) scale(1);
          opacity: 1;
        }
      }
      .heart::before {
        content: '';
        width: 100px;
        height: 100px;
        border-radius: 50%;
        background-color: red;
        position: absolute;
        transform: translateX(-50px);
      }
      .heart::after {
        content: '';
        width: 100px;
        height: 100px;
        border-radius: 50%;
        background-color: red;
        position: absolute;
        transform: translateY(-50px);
      }
    </style>
  </head>
  <body>
    <div class="heart"></div>
  </body>
</html>
